package raj.scr;

import java.awt.Dimension;
import java.awt.GridLayout;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;


public class CourseForm extends JFrame{
	
	private JPanel coursePanel;
	
	private static JTextField tfID;
	private static JTextField tfName;
	private static JTextField tfCallNo;
	private static JTextField tfInstructor;
	
	private JLabel lID;
	private JLabel lName;
	private JLabel lCallNo;
	private JLabel lInstructor;
	
	public CourseForm(){
		setTextFields();
		 this.setContentPane(coursePanel);
	
		
	 }
	public static JTextField getTfID() {
		return tfID;
	}
	public void setTfID(JTextField tfID) {
		this.tfID = tfID;
	}
	public static JTextField getTfName() {
		return tfName;
	}
	public void setTfName(JTextField tfName) {
		this.tfName = tfName;
	}
	public static JTextField getTfCallNo() {
		return tfCallNo;
	}
	public void setTfCallNo(JTextField tfCallNo) {
		this.tfCallNo = tfCallNo;
	}
	public static JTextField getTfInstructor() {
		return tfInstructor;
	}
	public void setTfInstructor(JTextField tfInstructor) {
		this.tfInstructor = tfInstructor;
	}
	
		

	public JPanel getCoursePanel() {
	return coursePanel;
}
public void setCoursePanel(JPanel coursePanel) {
	this.coursePanel = coursePanel;
}

public void setTextFields(){
//	gui.getUp1().setLayout(new GridLayout(6,2));
	 coursePanel=new JPanel();
     coursePanel.setLayout(new GridLayout(4,2));
     
	lID=new JLabel("  ID");
	coursePanel.add(lID);
	tfID=new JTextField();
	//tfID.setPreferredSize(new Dimension(40,20));
	tfID.setSize(NORMAL, NORMAL);
    coursePanel.add(tfID);
	
    lName=new JLabel("  Name");
	coursePanel.add(lName);
	tfName=new JTextField();
	coursePanel.add(tfName);
	
	lCallNo=new JLabel("  CallNo");
	coursePanel.add(lCallNo);
	tfCallNo= new JTextField();
	coursePanel.add(tfCallNo);
	
	lInstructor=new JLabel("  Instructor");
	coursePanel.add(lInstructor);
	tfInstructor=new JTextField();
	coursePanel.add(tfInstructor);
}
	
	
}// class closer
